package com.learn.project2.model.vo.admin.keyword;

import com.learn.project2.bean.MarketKeyword;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @description: 商场管理/关键词 Admin/keyword/create的输入映射
 * @author 曹源
 * @date  2022/1/7 16:57
 * @version 1.0
 */
@NoArgsConstructor
@Data
public class KeywordCreateVO {

    private Integer id;
    private String keyword;
    private String url;
    private Boolean isHot;
    private Boolean isDefault;
    private Date addTime;
    private Date updateTime;
    public static  KeywordCreateVO add(MarketKeyword marketKeyword){
        KeywordCreateVO keywordCreateVO = new KeywordCreateVO();
        keywordCreateVO.setId(marketKeyword.getId());
        keywordCreateVO.setKeyword(marketKeyword.getKeyword());
        keywordCreateVO.setUrl(marketKeyword.getUrl());
        keywordCreateVO.setIsHot(marketKeyword.getIsHot());
        keywordCreateVO.setIsDefault(marketKeyword.getIsDefault());
        keywordCreateVO.setAddTime( marketKeyword.getAddTime());
        keywordCreateVO.setUpdateTime( marketKeyword.getUpdateTime());
        return keywordCreateVO;
    }
}
